package com.appspot.niehonglei.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class AdminLogout  implements ActionInterface {

	@Override
	public void execute(HttpServletRequest request, HttpServletResponse response) {
		try {
			String url = request.getParameter("url");
			if(url == null || "".equals(url) || "null".equals(url)){
				url = "/";
			}
			request.getSession().removeAttribute("logName");
			response.sendRedirect(url);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
